<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="{:url()}" data-auto="true" method="post">
    <input type="hidden" name="id" value='{$vo.id|default=""}'>

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="title" value='{$vo.title|default=""}' required="required" title="请输入计划名称" placeholder="请输入计划名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">选择企业</label>
        <div class="layui-input-block" style="width: 34rem;">
            <select required class="layui-select" name="enterprise_id">
                {foreach $enterprises as $key=>$cate}
                <!--{if isset($vo.enterprise_id) and $key eq $vo.enterprise_id}-->
                <option selected value="{$key}">{$cate}</option>
                <!--{else}-->
                <option value="{$key}">{$cate}</option>
                <!--{/if}-->
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">体检中心</label>
        <div class="layui-input-block" style="width: 34rem;">
            <select required class="layui-select" name="mec_id">
                {foreach $mecs as $key=>$cate}
                <!--{if isset($vo.mec_id) and $key eq $vo.mec_id}-->
                <option selected value="{$key}">{$cate}</option>
                <!--{else}-->
                <option value="{$key}">{$cate}</option>
                <!--{/if}-->
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">团检套餐</label>
        <div class="layui-input-block" style="width: 34rem;">
            <select required class="layui-select" name="group_set_id">
                {foreach $group_set as $key=>$cate}
                <!--{if isset($vo.group_set_id) and $key eq $vo.group_set_id}-->
                <option selected value="{$key}">{$cate}</option>
                <!--{else}-->
                <option value="{$key}">{$cate}</option>
                <!--{/if}-->
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">开始日期</label>
        <div class="layui-input-block">
            <input class="layui-input rw20" id="start_date" title="开始日期不能为空哦" placeholder="设置开始日期" name='start_date' value="{$vo.start_date|default=''}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">结束日期</label>
        <div class="layui-input-block">
            <input class="layui-input rw20" id="end_date" title="结束日期不能为空哦" placeholder="设置结束日期" name='end_date' value="{$vo.end_date|default=''}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea name="comment" placeholder="请输入备注内容" class="layui-textarea">{$vo.comment|default=""}</textarea>
        </div>
    </div>
    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>

<script>
    (function () {
        window.form.render();
    })();

    $(function () {
        date = new Date();
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#start_date',
                min: 'date',
            });

            laydate.render({
                elem: '#end_date',
                min: 'date',
            });
        });
    });
</script>
